package com.youaishujuhui.devops.web.domain.channel;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Index;
import org.nutz.dao.entity.annotation.One;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.dao.entity.annotation.TableIndexes;

import com.youaishujuhui.devops.web.domain.game.Game;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Table("t_channel")
@TableIndexes({@Index(name="idx_gameId_nameEn",fields={"gameId", "nameEn"},unique = true)})
@Getter
@Setter
@ToString
public class Channel {
	@Id
	@Comment("渠道id")
	private int channelId;
	
	@Column
	@Comment("关联的游戏id")
	@ColDefine(notNull = true)
	private int gameId;
	
	@One(field = "gameId")
	private Game game;
	
	@Column
	@Comment("渠道中文名")
	@ColDefine(notNull = true, width = 50)
	private String nameCn;
	
	@Column
	@ColDefine(notNull = true, width = 50)
	@Comment("渠道英文名")
	private String nameEn;
	
	@Column
	@ColDefine(notNull = true, width = 50)
	@Comment("出机方")
	private String property;	
}
